package com.ziven.learn;

import androidx.annotation.NonNull;

import com.ziven.easygo.util.EasyUtils;
import com.ziven.easygo.util.LogHelper;
import com.ziven.easygo.util.Standard;
import com.ziven.processor.LearnBase;

/**
 * @author Ziven
 */
public interface LearnInterface extends LearnBase, Standard {

    /**
     * Print log
     * @param logs Log
     */
    default void log(@NonNull Object... logs) {
        LogHelper helper = LogHelper.of(this);
        EasyUtils.forEach(logs, helper::join);
        helper.always().print();
    }

    /**
     * print throwable
     * @param th Throwable
     */
    default void log(@NonNull Throwable th) {
        LogHelper.of(this).always().throwable(th).print();
    }
}
